<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of store_model
 *
 * @author Administrator
 */
class store_model extends CI_Model{
    //put your code here
    function __construct() {
        parent::__construct();
    }
    
    function getAllStore(){
        $query=$this->db->get(tbl_store);
        $this->db->order_by('store_id');
        if($query->num_rows<=0)return null;
        $arr=$query->result();
        return $arr[0];
    }
    
    function getStoreByID($id){
        $query=$this->db->get_where(tbl_store,array('store_id'=>$id));
        return $query->result();
    }
    
    function update_store($info,$id){
        $this->db->where('store_id',$id);
        return $this->db->update(tbl_store,$info);
    }
}

?>
